﻿#region Using directives
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using AlphaMobileControls;
using System.Drawing;
#endregion

namespace gpsMe.Classes
{
    /// <summary>
    /// Image of the grid that is displayed for navigation
    /// </summary>
    public class gpsMeMapImage
    {
        #region Accessors
        /// <summary>
        /// Current path of the Image
        /// </summary>
        public string Path { get; private set; }

        /// <summary>
        /// AlphaPictureBox object
        /// </summary>
        public AlphaPictureBox Image { get; private set; }
        #endregion

        #region Constructor
        /// <summary>
        /// Constructor of the gpsMeMapImage
        /// </summary>
        /// <param name="p_sPath">path of the image</param>
        public gpsMeMapImage(string p_sPath)
        {
            this.Image = new AlphaPictureBox();
            Bitmap oTempBitmap = new Bitmap(p_sPath);
            this.Image.Size = oTempBitmap.Size;
            oTempBitmap.Dispose();
            oTempBitmap = null;
            this.Image.Image = AlphaImage.CreateFromFile(p_sPath);
            this.Path = p_sPath;
        }
        #endregion
    }
}
